#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QtNetWork>
#include "chatmainwindow.h"
#include "network.h"
#include "struct_pp.h"
#include "date.h"

namespace Ui {
    class MainWindow;
}


class date;
class QUdpSocket;

struct Friend
{
    chatMainWindow *h;
    QString ID;
    Friend *next;
};



class MainWindow : public QMainWindow
{
    Q_OBJECT


signals:void  te(pp R);

public:

    chatMainWindow * xun(QString add);
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    date *Da;
    NetWork *network;
public slots:
    void dele(QString T);
    void sendmessage(QString id,QString message);
    void sendface(QString id,QString K);
    void Te(pp R);
    void Records(QString,QString,QString);
    void showRecords(QString);


private slots:
    void action1(pp person);
    void action2(QString ID,QString message);
    void action3(QString ID,QString message);
    void on_pushButton_3_clicked();

    void on_pushButton_clicked();

    void on_listWidget_currentTextChanged(const QString &currentText);

    void on_listWidget_doubleClicked(const QModelIndex &index);

    void on_listWidget_2_currentTextChanged(const QString &currentText);

    void on_listWidget_2_doubleClicked(const QModelIndex &index);

    void on_listWidget_3_doubleClicked(const QModelIndex &index);

    void on_listWidget_3_currentTextChanged(const QString &currentText);

    void on_pushButton_2_clicked();

private:
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H
